home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / DefaultMetalTheme.java < prev    next >
Text File  |  1998-06-30  |  3KB  |  75 lines

  1. /*
  2.  * @(#)DefaultMetalTheme.java    1.9 98/03/06
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21. package com.sun.java.swing.plaf.metal;
  22.  
  23. import com.sun.java.swing.plaf.*;
  24. import com.sun.java.swing.*;
  25. import java.awt.*;
  26.  
  27. /**
  28.  * This class describes the default Metal Theme.
  29.  * <p>
  30.  * Warning: serialized objects of this class will not be compatible with
  31.  * future swing releases.  The current serialization support is appropriate
  32.  * for short term storage or RMI between Swing1.0 applications.  It will
  33.  * not be possible to load serialized Swing1.0 objects with future releases
  34.  * of Swing.  The JDK1.2 release of Swing will be the compatibility
  35.  * baseline for the serialized form of Swing objects.
  36.  *
  37.  * @version 1.9 03/06/98
  38.  * @author Steve Wilson
  39.  */
  40. public class DefaultMetalTheme extends MetalTheme {
  41.  
  42.     private final ColorUIResource primary1 = new ColorUIResource(102, 102, 153);
  43.     private final ColorUIResource primary2 = new ColorUIResource(153, 153, 204);
  44.     private final ColorUIResource primary3 = new ColorUIResource(204, 204, 255);
  45.  
  46.     private final ColorUIResource secondary1 = new ColorUIResource(102, 102, 102);
  47.     private final ColorUIResource secondary2 = new ColorUIResource(153, 153, 153);
  48.     private final ColorUIResource secondary3 = new ColorUIResource(204, 204, 204);
  49.  
  50.     private final FontUIResource controlFont = new FontUIResource("Dialog", Font.BOLD, 12);
  51.     private final FontUIResource systemFont = new FontUIResource("Dialog", Font.PLAIN, 12);
  52.     private final FontUIResource windowTitleFont = new FontUIResource("SansSerif", Font.BOLD, 12);
  53.     private final FontUIResource userFont = new FontUIResource("SansSerif", Font.PLAIN, 12);
  54.     private final FontUIResource smallFont = new FontUIResource("Dialog", Font.PLAIN, 10);
  55.  
  56.     public String getName() { return "Steel"; }
  57.  
  58. // these are blue in Metal Default Theme
  59.     protected ColorUIResource getPrimary1() { return primary1; } 
  60.     protected ColorUIResource getPrimary2() { return primary2; }
  61.     protected ColorUIResource getPrimary3() { return primary3; }
  62.  
  63. // these are gray in Metal Default Theme
  64.     protected ColorUIResource getSecondary1() { return secondary1; }
  65.     protected ColorUIResource getSecondary2() { return secondary2; }
  66.     protected ColorUIResource getSecondary3() { return secondary3; }
  67.  
  68.     public FontUIResource getControlTextFont() { return controlFont;}
  69.     public FontUIResource getSystemTextFont() { return systemFont;}
  70.     public FontUIResource getUserTextFont() { return userFont;}
  71.     public FontUIResource getMenuTextFont() { return controlFont;}
  72.     public FontUIResource getWindowTitleFont() { return controlFont;}
  73.     public FontUIResource getSubTextFont() { return smallFont;}
  74. }
  75.